﻿<Grid HorizontalAlignment="Stretch" Height="50" Background="{Binding PrimaryBackground}"
      x:Class="MusicExplorer.Views.Wrappers.TrackTileView"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:converters="using:MusicExplorer.Converters">
    
    <Grid.Resources>
        <converters:UriTo50x50BitmapConverter x:Key="UriTo50x50BitmapConverter" />
    </Grid.Resources>
    
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="50" />
        <ColumnDefinition Width="50" />
        <ColumnDefinition Width="50" />
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="200" />
        <ColumnDefinition Width="200" />
        <ColumnDefinition Width="150" />
    </Grid.ColumnDefinitions>
    <Border Height="50">
        <TextBlock FontFamily="Segoe UI Symbol" Foreground="{Binding PrimaryForeground}"
                   Text="&#xE10B;" HorizontalAlignment="Center" VerticalAlignment="Center"
                   Visibility="{Binding IsRead, Converter={StaticResource BooleanToVisibilityConverter}}" />
    </Border>
    <Border Height="50" Grid.Column="1">
        <Image Source="{Binding RepositoryIcon}" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" />
    </Border>
    <Border Height="50" Grid.Column="2">
        <Image Source="{Binding Artwork, Converter={StaticResource UriTo50x50BitmapConverter}}"
               Stretch="UniformToFill" HorizontalAlignment="Center" VerticalAlignment="Center" />
    </Border>
    <Border Grid.Column="3" Height="50">
        <TextBlock Text="{Binding DisplayName}" Style="{StaticResource DefaultApplicationTextBlockStyle}"
                   Foreground="{Binding PrimaryForeground}" TextWrapping="NoWrap" Margin="0, -8, 0, 0"
                   VerticalAlignment="Center" Padding="10, 0, 0, 0" LineHeight="18"
                   TextTrimming="WordEllipsis" />
    </Border>
    <Border Grid.Column="4" Height="50">
        <TextBlock Text="{Binding DisplayComposers}" Style="{StaticResource DefaultApplicationTextBlockStyle}"
                   Foreground="{Binding SecondaryForeground}" TextWrapping="NoWrap" TextTrimming="WordEllipsis"
                   VerticalAlignment="Center" Padding="10, 0, 0, 0" LineHeight="10" />
    </Border>
    <Border Grid.Column="5" Height="50">
        <TextBlock Text="{Binding DisplayRemixers}" Style="{StaticResource DefaultApplicationTextBlockStyle}"
                   Foreground="{Binding SecondaryForeground}" TextWrapping="NoWrap" TextTrimming="WordEllipsis"
                   VerticalAlignment="Center" Padding="10, 0, 0, 0" LineHeight="10" />
    </Border>
    <Border Grid.Column="6" Height="50">
        <TextBlock Text="{Binding DisplayDate}" Style="{StaticResource DefaultApplicationTextBlockStyle}"
                   Foreground="{Binding SecondaryForeground}" VerticalAlignment="Center"
                   Padding="0, 0, 40, 0" LineHeight="10" />
    </Border>
</Grid>
